+2007-12-22 Christian Persch <chpe@gnome.org>
+
+ * modules/other/gail/gail.c:
+ * modules/other/gail/gailbutton.c:
+ * modules/other/gail/gailcell.c:
+ * modules/other/gail/gailcombo.c:
+ * modules/other/gail/gailcombo.h:
+ * modules/other/gail/gailcombobox.c:
+ * modules/other/gail/gailentry.c:
+ * modules/other/gail/gailexpander.c:
+ * modules/other/gail/gailmenuitem.c:
+ * modules/other/gail/gailnotebook.c:
+ * modules/other/gail/gailnotebookpage.c:
+ * modules/other/gail/gailnotebookpage.h:
+ * modules/other/gail/gailoptionmenu.c:
+ * modules/other/gail/gailrange.c:
+ * modules/other/gail/gailtextview.c:
+ * modules/other/gail/gailtreeview.c:
+ * modules/other/gail/gailtreeview.h:
+ * modules/other/gail/gailwindow.c: Use gdk_threads_add_idle.
+ Bug #504571.
+
2007-12-22 Matthias Clasen <mclasen@redhat.com>
* modules/other/gail/gailclist.c: Chain up the finalizer (#504570,
return TRUE;
}
-
-static gint
+static gboolean
gail_focus_idle_handler (gpointer data)
{
- GDK_THREADS_ENTER();
-
focus_notify_handler = 0;
/*
* The widget which was to receive focus may have been removed
if (!next_focus_widget)
{
if (next_focus_widget != data)
- {
- GDK_THREADS_LEAVE ();
- return FALSE;
- }
+ return FALSE;
}
else
{
gail_focus_notify (data);
- GDK_THREADS_LEAVE ();
- return FALSE;
+ return FALSE;
}
static void
}
}
- focus_notify_handler = g_idle_add (gail_focus_idle_handler, widget);
+ focus_notify_handler = gdk_threads_add_idle (gail_focus_idle_handler, widget);
}
static gboolean
}
g_queue_push_head (button->action_queue, (gpointer) i);
if (!button->action_idle_handler)
- button->action_idle_handler = g_idle_add (idle_do_action, button);
+ button->action_idle_handler = gdk_threads_add_idle (idle_do_action, button);
break;
default:
return_value = FALSE;
GailButton *gail_button;
GdkEvent tmp_event;
- GDK_THREADS_ENTER ();
-
gail_button = GAIL_BUTTON (data);
gail_button->action_idle_handler = 0;
widget = GTK_ACCESSIBLE (gail_button)->widget;
if (widget == NULL /* State is defunct */ ||
!GTK_WIDGET_IS_SENSITIVE (widget) || !GTK_WIDGET_VISIBLE (widget))
- {
- GDK_THREADS_LEAVE ();
- return FALSE;
- }
+ return FALSE;
else
gtk_widget_event (widget, &tmp_event);
}
}
- GDK_THREADS_LEAVE ();
-
- return FALSE;
+ return FALSE;
}
static gint
if (cell->action_idle_handler)
return FALSE;
cell->action_func = info->do_action_func;
- cell->action_idle_handler = g_idle_add (idle_do_action, cell);
+ cell->action_idle_handler = gdk_threads_add_idle (idle_do_action, cell);
return TRUE;
}
{
GailCell *cell;
- GDK_THREADS_ENTER ();
-
cell = GAIL_CELL (data);
cell->action_idle_handler = 0;
cell->action_func (cell);
- GDK_THREADS_LEAVE ();
-
return FALSE;
}
{
GailCombo *combo;
- GDK_THREADS_ENTER ();
-
combo = GAIL_COMBO (data);
combo->old_selection = NULL;
combo->deselect_idle_handler = 0;
g_signal_emit_by_name (data, "selection_changed");
- GDK_THREADS_LEAVE ();
-
return FALSE;
}
{
GailCombo *combo;
- GDK_THREADS_ENTER ();
-
combo = GAIL_COMBO (data);
combo->select_idle_handler = 0;
g_signal_emit_by_name (data, "selection_changed");
- GDK_THREADS_LEAVE ();
-
return FALSE;
}
{
gail_combo->old_selection = slist->data;
if (gail_combo->select_idle_handler == 0)
- gail_combo->select_idle_handler = g_idle_add (notify_select, gail_combo);
+ gail_combo->select_idle_handler = gdk_threads_add_idle (notify_select, gail_combo);
}
if (gail_combo->deselect_idle_handler)
{
else
{
if (gail_combo->deselect_idle_handler == 0)
- gail_combo->deselect_idle_handler = g_idle_add (notify_deselect, gail_combo);
+ gail_combo->deselect_idle_handler = gdk_threads_add_idle (notify_deselect, gail_combo);
if (gail_combo->select_idle_handler)
{
g_source_remove (gail_combo->select_idle_handler);
if (combo->action_idle_handler)
return FALSE;
- combo->action_idle_handler = g_idle_add (idle_do_action, combo);
+ combo->action_idle_handler = gdk_threads_add_idle (idle_do_action, combo);
return TRUE;
}
else
gboolean do_popup;
GdkEvent tmp_event;
- GDK_THREADS_ENTER ();
-
gail_combo = GAIL_COMBO (data);
gail_combo->action_idle_handler = 0;
widget = GTK_ACCESSIBLE (gail_combo)->widget;
if (widget == NULL /* State is defunct */ ||
!GTK_WIDGET_SENSITIVE (widget) || !GTK_WIDGET_VISIBLE (widget))
- {
- GDK_THREADS_LEAVE ();
- return FALSE;
- }
+ return FALSE;
combo = GTK_COMBO (widget);
gtk_widget_event (action_widget, &tmp_event);
+ /* FIXME !*/
g_idle_add (_gail_combo_button_release, combo);
}
else
action_widget = combo->popwin;
gtk_widget_event (action_widget, &tmp_event);
+ /* FIXME !*/
g_idle_add (_gail_combo_popup_release, combo);
}
- GDK_THREADS_LEAVE ();
-
return FALSE;
}
{
GailContainer parent;
+ gpointer old_selection;
gchar *press_description;
- guint action_idle_handler;
- gpointer old_selection;
+ guint action_idle_handler;
guint select_idle_handler;
guint deselect_idle_handler;
};
if (combo_box->action_idle_handler)
return FALSE;
- combo_box->action_idle_handler = g_idle_add (idle_do_action, combo_box);
+ combo_box->action_idle_handler = gdk_threads_add_idle (idle_do_action, combo_box);
return TRUE;
}
else
AtkObject *popup;
gboolean do_popup;
- GDK_THREADS_ENTER ();
-
gail_combo_box = GAIL_COMBO_BOX (data);
gail_combo_box->action_idle_handler = 0;
widget = GTK_ACCESSIBLE (gail_combo_box)->widget;
if (widget == NULL || /* State is defunct */
!GTK_WIDGET_SENSITIVE (widget) || !GTK_WIDGET_VISIBLE (widget))
- {
- GDK_THREADS_LEAVE ();
- return FALSE;
- }
+ return FALSE;
combo_box = GTK_COMBO_BOX (widget);
else
gtk_combo_box_popdown (combo_box);
- GDK_THREADS_LEAVE ();
-
return FALSE;
}
{
GailEntry *entry;
- GDK_THREADS_ENTER ();
-
entry = GAIL_ENTRY (data);
entry->insert_idle_handler = 0;
gail_entry_notify_insert (entry);
- GDK_THREADS_LEAVE ();
-
return FALSE;
}
* or in an idle handler if it not updated.
*/
if (gail_entry->insert_idle_handler == 0)
- gail_entry->insert_idle_handler = g_idle_add (idle_notify_insert, gail_entry);
+ gail_entry->insert_idle_handler = gdk_threads_add_idle (idle_notify_insert, gail_entry);
}
static gunichar
if (entry->action_idle_handler)
return_value = FALSE;
else
- entry->action_idle_handler = g_idle_add (idle_do_action, entry);
+ entry->action_idle_handler = gdk_threads_add_idle (idle_do_action, entry);
break;
default:
return_value = FALSE;
GailEntry *entry;
GtkWidget *widget;
- GDK_THREADS_ENTER ();
-
entry = GAIL_ENTRY (data);
entry->action_idle_handler = 0;
widget = GTK_ACCESSIBLE (entry)->widget;
if (widget == NULL /* State is defunct */ ||
!GTK_WIDGET_SENSITIVE (widget) || !GTK_WIDGET_VISIBLE (widget))
- {
- GDK_THREADS_LEAVE ();
- return FALSE;
- }
+ return FALSE;
gtk_widget_activate (widget);
- GDK_THREADS_LEAVE ();
-
return FALSE;
}
if (expander->action_idle_handler)
return_value = FALSE;
else
- expander->action_idle_handler = g_idle_add (idle_do_action, expander);
+ expander->action_idle_handler = gdk_threads_add_idle (idle_do_action, expander);
break;
default:
return_value = FALSE;
GtkWidget *widget;
GailExpander *gail_expander;
- GDK_THREADS_ENTER ();
-
gail_expander = GAIL_EXPANDER (data);
gail_expander->action_idle_handler = 0;
widget = GTK_ACCESSIBLE (gail_expander)->widget;
if (widget == NULL /* State is defunct */ ||
!GTK_WIDGET_IS_SENSITIVE (widget) || !GTK_WIDGET_VISIBLE (widget))
- {
- GDK_THREADS_LEAVE ();
- return FALSE;
- }
+ return FALSE;
gtk_widget_activate (widget);
- GDK_THREADS_LEAVE ();
-
- return FALSE;
+ return FALSE;
}
static gint
return FALSE;
else
{
- g_object_ref (gail_menu_item);
- gail_menu_item->action_idle_handler = g_idle_add (idle_do_action, gail_menu_item);
+ gail_menu_item->action_idle_handler =
+ gdk_threads_add_idle_full (G_PRIORITY_DEFAULT_IDLE,
+ idle_do_action,
+ g_object_ref (gail_menu_item),
+ (GDestroyNotify) g_object_unref);
}
return TRUE;
}
GailMenuItem *menu_item;
gboolean item_mapped;
- GDK_THREADS_ENTER ();
-
menu_item = GAIL_MENU_ITEM (data);
menu_item->action_idle_handler = 0;
item = GTK_ACCESSIBLE (menu_item)->widget;
if (item == NULL /* State is defunct */ ||
!GTK_WIDGET_SENSITIVE (item) || !GTK_WIDGET_VISIBLE (item))
- {
- g_object_unref (menu_item);
- GDK_THREADS_LEAVE ();
return FALSE;
- }
item_parent = gtk_widget_get_parent (item);
gtk_menu_shell_select_item (GTK_MENU_SHELL (item_parent), item);
if (!item_mapped)
ensure_menus_unposted (menu_item);
- g_object_unref (menu_item);
- GDK_THREADS_LEAVE ();
-
return FALSE;
}
{
if (gail_notebook->idle_focus_id)
g_source_remove (gail_notebook->idle_focus_id);
- gail_notebook->idle_focus_id = g_idle_add (gail_notebook_check_focus_tab, atk_obj);
+ gail_notebook->idle_focus_id = gdk_threads_add_idle (gail_notebook_check_focus_tab, atk_obj);
}
}
else
}
g_list_free (notebook->page_cache);
+
+ if (notebook->idle_focus_id)
+ g_source_remove (notebook->idle_focus_id);
+
G_OBJECT_CLASS (parent_class)->finalize (object);
}
{
case GTK_DIR_LEFT:
case GTK_DIR_RIGHT:
- if (gail_notebook->idle_focus_id)
- g_source_remove (gail_notebook->idle_focus_id);
- gail_notebook->idle_focus_id = g_idle_add (gail_notebook_check_focus_tab, atk_obj);
+ if (gail_notebook->idle_focus_id == 0)
+ gail_notebook->idle_focus_id = gdk_threads_add_idle (gail_notebook_check_focus_tab, atk_obj);
break;
default:
break;
GailNotebook *gail_notebook;
GtkNotebook *gtk_notebook;
- GDK_THREADS_ENTER ();
-
atk_obj = ATK_OBJECT (data);
gail_notebook = GAIL_NOTEBOOK (atk_obj);
widget = GTK_ACCESSIBLE (atk_obj)->widget;
gail_notebook->idle_focus_id = 0;
if (!gtk_notebook->focus_tab)
- {
- GDK_THREADS_LEAVE ();
- return FALSE;
- }
+ return FALSE;
old_focus_page_num = gail_notebook->focus_tab_page;
focus_page_num = g_list_index (gtk_notebook->children, gtk_notebook->focus_tab->data);
g_object_unref (obj);
}
- GDK_THREADS_LEAVE ();
-
return FALSE;
}
GailNotebook *gail_notebook = GAIL_NOTEBOOK (data);
if (gail_notebook->idle_focus_id)
- g_source_remove (gail_notebook->idle_focus_id);
+ {
+ g_source_remove (gail_notebook->idle_focus_id);
+ gail_notebook->idle_focus_id = 0;
+ }
}
GailNotebookPage *page;
AtkObject *atk_object, *atk_parent;
- GDK_THREADS_ENTER ();
-
g_return_val_if_fail (GAIL_IS_NOTEBOOK_PAGE (data), FALSE);
page = GAIL_NOTEBOOK_PAGE (data);
atk_object = ATK_OBJECT (data);
+ page->notify_child_added_id = 0;
+
/* The widget page->notebook may be deleted before this handler is called */
if (page->notebook != NULL)
{
g_signal_emit_by_name (atk_parent, "children_changed::add", page->index, atk_object, NULL);
}
- GDK_THREADS_LEAVE ();
-
return FALSE;
}
atk_object->role = ATK_ROLE_PAGE_TAB;
atk_object->layer = ATK_LAYER_WIDGET;
- g_idle_add (notify_child_added, atk_object);
+ page->notify_child_added_id = gdk_threads_add_idle (notify_child_added, atk_object);
/*
* We get notified of changes to the label
*/
if (page->textutil)
g_object_unref (page->textutil);
- G_OBJECT_CLASS (parent_class)->finalize (object);
+ if (page->notify_child_added_id)
+ g_source_remove (page->notify_child_added_id);
+ G_OBJECT_CLASS (parent_class)->finalize (object);
}
static G_CONST_RETURN gchar*
GtkNotebookPage *page;
gint index;
+ guint notify_child_added_id;
GailTextUtil *textutil;
};
if (button->action_idle_handler)
return_value = FALSE;
else
- button->action_idle_handler = g_idle_add (idle_do_action, button);
+ button->action_idle_handler = gdk_threads_add_idle (idle_do_action, button);
break;
default:
return_value = FALSE;
GdkEvent tmp_event;
GailButton *gail_button;
- GDK_THREADS_ENTER ();
-
gail_button = GAIL_BUTTON (data);
gail_button->action_idle_handler = 0;
widget = GTK_ACCESSIBLE (gail_button)->widget;
if (widget == NULL /* State is defunct */ ||
!GTK_WIDGET_SENSITIVE (widget) || !GTK_WIDGET_VISIBLE (widget))
- {
- GDK_THREADS_LEAVE ();
- return FALSE;
- }
+ return FALSE;
button = GTK_BUTTON (widget);
gtk_widget_event (widget, &tmp_event);
- GDK_THREADS_LEAVE ();
-
- return FALSE;
+ return FALSE;
}
static gint
if (range->action_idle_handler)
return_value = FALSE;
else
- range->action_idle_handler = g_idle_add (idle_do_action, range);
+ range->action_idle_handler = gdk_threads_add_idle (idle_do_action, range);
}
else
return_value = FALSE;
GailRange *range;
GtkWidget *widget;
- GDK_THREADS_ENTER ();
-
range = GAIL_RANGE (data);
range->action_idle_handler = 0;
widget = GTK_ACCESSIBLE (range)->widget;
if (widget == NULL /* State is defunct */ ||
!GTK_WIDGET_SENSITIVE (widget) || !GTK_WIDGET_VISIBLE (widget))
- {
- GDK_THREADS_LEAVE ();
return FALSE;
- }
gtk_widget_activate (widget);
- GDK_THREADS_LEAVE ();
-
return FALSE;
}
{
if (!gail_text_view->insert_notify_handler)
{
- gail_text_view->insert_notify_handler = g_idle_add (insert_idle_handler, accessible);
+ gail_text_view->insert_notify_handler = gdk_threads_add_idle (insert_idle_handler, accessible);
}
return;
}
GailTextView *gail_text_view;
GtkTextBuffer *buffer;
- GDK_THREADS_ENTER ();
-
gail_text_view = GAIL_TEXT_VIEW (data);
g_signal_emit_by_name (data,
gail_text_view->previous_selection_bound = get_selection_bound (buffer);
}
- GDK_THREADS_LEAVE ();
-
return FALSE;
}
/* remove any idle handlers still pending */
if (view->idle_garbage_collect_id)
- g_source_remove (view->idle_garbage_collect_id);
+ g_source_remove (view->idle_garbage_collect_id);
+ if (view->idle_cursor_changed_id)
+ g_source_remove (view->idle_cursor_changed_id);
+ if (view->idle_expand_id)
+ g_source_remove (view->idle_expand_id);
if (view->caption)
g_object_unref (view->caption);
*/
/* this seems wrong since it overwrites any other pending expand handlers... */
gailview->idle_expand_path = gtk_tree_path_copy (path);
- if (gailview->idle_expand_id) g_source_remove (gailview->idle_expand_id);
- gailview->idle_expand_id = g_idle_add (idle_expand_row, gailview);
+ if (gailview->idle_expand_id)
+ g_source_remove (gailview->idle_expand_id);
+ gailview->idle_expand_id = gdk_threads_add_idle (idle_expand_row, gailview);
return FALSE;
}
GtkTreeModel *tree_model;
gint n_inserted, row;
- GDK_THREADS_ENTER ();
+ gailview->idle_expand_id = 0;
path = gailview->idle_expand_path;
tree_view = GTK_TREE_VIEW (GTK_ACCESSIBLE (gailview)->widget);
g_assert (GTK_IS_TREE_VIEW (tree_view));
tree_model = gtk_tree_view_get_model(tree_view);
-
- g_assert (GTK_IS_TREE_MODEL (tree_model));
+ if (!tree_model)
+ return FALSE;
if (!path || !gtk_tree_model_get_iter (tree_model, &iter, path))
- {
- GDK_THREADS_LEAVE ();
- return FALSE;
- }
+ return FALSE;
/*
* Update visibility of cells below expansion row
else
{
/* We can get here if the row expanded callback deleted the row */
- GDK_THREADS_LEAVE ();
return FALSE;
}
gtk_tree_path_free (path);
- GDK_THREADS_LEAVE ();
-
return FALSE;
}
static void
cursor_changed (GtkTreeView *tree_view)
{
+ GailTreeView *gailview;
+
+ gailview = GAIL_TREE_VIEW (gtk_widget_get_accessible (GTK_WIDGET (tree_view)));
+ if (gailview->idle_cursor_changed_id != 0)
+ return;
+
/*
* We notify the focus change in a idle handler so that the processing
* of the cursor change is completed when the focus handler is called.
* This will allow actions to be called in the focus handler
*/
- g_idle_add (idle_cursor_changed, gtk_widget_get_accessible (GTK_WIDGET (tree_view)));
+ gailview->idle_cursor_changed_id = gdk_threads_add_idle (idle_cursor_changed, gailview);
}
static gint
idle_cursor_changed (gpointer data)
{
+ GailTreeView *gail_tree_view = GAIL_TREE_VIEW (data);
GtkTreeView *tree_view;
GtkWidget *widget;
- AtkObject *parent;
AtkObject *cell;
- GDK_THREADS_ENTER ();
+ gail_tree_view->idle_cursor_changed_id = 0;
- parent = ATK_OBJECT (data);
-
- widget = GTK_ACCESSIBLE (parent)->widget;
+ widget = GTK_ACCESSIBLE (gail_tree_view)->widget;
/*
* Widget has been deleted
*/
if (widget == NULL)
- {
- GDK_THREADS_LEAVE ();
- return FALSE;
- }
+ return FALSE;
tree_view = GTK_TREE_VIEW (widget);
cell = gail_tree_view_ref_focus_cell (tree_view);
if (cell)
{
- GailTreeView *gail_tree_view;
-
- gail_tree_view = GAIL_TREE_VIEW (parent);
-
if (cell != gail_tree_view->focus_cell)
{
if (gail_tree_view->focus_cell)
if (GTK_WIDGET_HAS_FOCUS (widget))
gail_cell_add_state (GAIL_CELL (cell), ATK_STATE_ACTIVE, FALSE);
- g_signal_emit_by_name (parent,
+ g_signal_emit_by_name (gail_tree_view,
"active-descendant-changed",
cell);
}
g_object_unref (cell);
}
- GDK_THREADS_LEAVE ();
-
return FALSE;
}
if (gailview->idle_expand_id)
{
g_source_remove (gailview->idle_expand_id);
+ gailview->idle_expand_id = 0;
+
/* don't do this if the insertion precedes the idle path, since it will now be invalid */
if (path && gailview->idle_expand_path &&
(gtk_tree_path_compare (path, gailview->idle_expand_path) > 0))
set_expand_state (tree_view, tree_model, gailview, gailview->idle_expand_path, FALSE);
if (gailview->idle_expand_path)
gtk_tree_path_free (gailview->idle_expand_path);
- gailview->idle_expand_id = 0;
}
/* Check to see if row is visible */
row = get_row_from_tree_path (tree_view, path);
cell_info->in_use = FALSE;
if (!gailview->garbage_collection_pending) {
gailview->garbage_collection_pending = TRUE;
+ g_assert (gailview->idle_garbage_collect_id == 0);
gailview->idle_garbage_collect_id =
- g_idle_add (idle_garbage_collect_cell_data, gailview);
+ gdk_threads_add_idle (idle_garbage_collect_cell_data, gailview);
}
}
}
}
}
-
static gboolean
idle_garbage_collect_cell_data (gpointer data)
{
GailTreeView *tree_view;
- GDK_THREADS_ENTER ();
g_assert (GAIL_IS_TREE_VIEW (data));
tree_view = (GailTreeView *)data;
tree_view->garbage_collection_pending = garbage_collect_cell_data (data);
- GDK_THREADS_LEAVE ();
-
- /* N.B.: if for some reason another handler has re-enterantly been queued
+ /* N.B.: if for some reason another handler has re-enterantly been queued
* while this handler was being serviced, it has its own gsource, therefore this handler
* should always return FALSE.
*/
if (!cell_info->view->garbage_collection_pending) {
cell_info->view->garbage_collection_pending = TRUE;
cell_info->view->idle_garbage_collect_id =
- g_idle_add (idle_garbage_collect_cell_data, cell_info->view);
+ gdk_threads_add_idle (idle_garbage_collect_cell_data, cell_info->view);
}
}
}
GtkAdjustment *old_vadj;
guint idle_expand_id;
guint idle_garbage_collect_id;
+ guint idle_cursor_changed_id;
GtkTreePath *idle_expand_path;
gboolean garbage_collection_pending;
};
GailWindow *window;
AtkObject *obj;
- GDK_THREADS_ENTER ();
-
window = GAIL_WINDOW (data);
window->name_change_handler = 0;
if (GTK_ACCESSIBLE (window)->widget == NULL)
- {
- GDK_THREADS_LEAVE ();
- return FALSE;
- }
+ return FALSE;
obj = ATK_OBJECT (window);
if (obj->name == NULL)
g_object_notify (G_OBJECT (obj), "accessible-name");
}
g_signal_emit_by_name (obj, "visible_data_changed");
- GDK_THREADS_LEAVE ();
+
return FALSE;
}
window->previous_name = g_strdup (name);
if (window->name_change_handler == 0)
- window->name_change_handler = g_idle_add (idle_notify_name_change, atk_obj);
+ window->name_change_handler = gdk_threads_add_idle (idle_notify_name_change, atk_obj);
}
}
else
{
int screen_n = GPOINTER_TO_INT (data);
- GDK_THREADS_ENTER ();
-
gail_screens [screen_n].update_handler = 0;
gail_screens [screen_n].update_stacked_windows = FALSE;
get_stacked_windows (&gail_screens [screen_n]);
- GDK_THREADS_LEAVE ();
-
return FALSE;
}
GailScreenInfo *info;
int i;
- GDK_THREADS_ENTER ();
-
info = &gail_screens [screen_n];
info->update_desktop_handler = 0;
}
}
- GDK_THREADS_LEAVE ();
-
return FALSE;
}
gail_screens [screen_n].update_stacked_windows = TRUE;
if (!gail_screens [screen_n].update_handler)
{
- gail_screens [screen_n].update_handler = g_idle_add (update_screen_info,
- GINT_TO_POINTER (screen_n));
+ gail_screens [screen_n].update_handler = gdk_threads_add_idle (update_screen_info,
+ GINT_TO_POINTER (screen_n));
}
}
}
info->desktop_changed [j] = TRUE;
if (!info->update_desktop_handler)
{
- info->update_desktop_handler = g_idle_add (update_desktop_info,
- GINT_TO_POINTER (i));
+ info->update_desktop_handler = gdk_threads_add_idle (update_desktop_info,
+ GINT_TO_POINTER (i));
}
break;
}